package com.situ.study.day7;

import org.junit.Test;

public class Demo {
    //全局变量，不赋值会赋值默认值
    //Student student;
    //int num;

    @Test
    public void test1() {
        //局部变量,必须要初始化
        Student student = null;
        //Variable 'student' might not have been initialized
        System.out.println(student);//null
        // null.属性 null.方法
        // java.lang.NullPointerException
        System.out.println(student.name);
        student.show();

    }
}
